Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sponge module refactoring and fixes #2697

Open
wants to merge 6 commits into
base: version/7.3.x
Choose a base branch
from

Conversation

Vilsu221
Copy link
Contributor

Replace vanilla methods with sponge api when possible.

Fix items drop when making block changes.

Implement sendBiomeUpdates.

Move listeners into own class.

Cleanup dead code.

@Vilsu221 Vilsu221 requested a review from a team as a code owner January 16, 2025 20:55
Copy link
Collaborator

@wizjany wizjany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I'm unsure that we actually want all the changes from MC to Sponge classes/methods. Given that most of the Sponge API is just implemented via mixin, the only thing this really accomplishes and pushing the we-sponge code base even further from we-fabric/we-neoforge (making it harder to maintain), and there's several places where sponge classes are just cast back to MC classes anyway.

If this PR just had the block/biome fixes and maybe even the event listener refactor (though see my comments), it would be a lot easier to pull, but right now I feel like there's too much that isn't necessarily a benefit.

@Vilsu221
Copy link
Contributor Author

Vilsu221 commented Jan 20, 2025

In general, I'm unsure that we actually want all the changes from MC to Sponge classes/methods. Given that most of the Sponge API is just implemented via mixin, the only thing this really accomplishes and pushing the we-sponge code base even further from we-fabric/we-neoforge (making it harder to maintain), and there's several places where sponge classes are just cast back to MC classes anyway.

If this PR just had the block/biome fixes and maybe even the event listener refactor (though see my comments), it would be a lot easier to pull, but right now I feel like there's too much that isn't necessarily a benefit.

In my opinion Sponge API is more "stable" than MC.

@Vilsu221 Vilsu221 requested a review from wizjany January 23, 2025 00:42
@me4502
Copy link
Member

me4502 commented Jan 23, 2025

given we're working with multiple platforms that are Minecraft code, from a maintainability perspective it's often better. Any potential benefits are immediately removed by all (from what i can tell) spots where you've swapped over to Sponge code requiring casting back to MC native code anyway.

I agree with wiz in that splitting out the biome & block fixes would be significantly better than this PR as-is. it's doing too much at once, and they're not all changes that make sense for us to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants